package com.telenav;

import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.core.Scalar;

public class Test2 {
	static {
		System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Mat mat = new Mat(2, 2, CvType.CV_8UC1, new Scalar(1,2,3,4));
		System.out.println(mat.dump());
		mat = new Mat(2, 2, CvType.CV_8UC3, new Scalar(1,2,3,4));
		System.out.println(mat.dump());
		mat = new Mat(2, 2, CvType.CV_8UC3, new Scalar(300,2,3,4));
		System.out.println(mat.dump());
		mat = new Mat(2, 2, CvType.CV_16UC3, new Scalar(300,-2,3,4));
		System.out.println(mat.dump());
		mat = new Mat(2, 2, CvType.CV_16SC3, new Scalar(300,-2,3,4));
		System.out.println(mat.dump());
		Mat mat_r0 = mat.row(0);
		mat_r0.setTo(new Scalar(5,6));
		System.out.println(mat.dump());
		mat.row(1).col(1).setTo(new Scalar(7));
		System.out.println(mat.dump());
		mat = new Mat(2, 2, CvType.CV_32FC3, new Scalar(-1.5,2,3,4));
		System.out.println(mat.dump());
		Point p = new Point(new double[]{1.0,2.0,3.0,4.0});
		System.out.println(p);
	}

}
